import {
  IsString,
  IsOptional,
  IsBoolean,
  IsNumber,
  Min,
  Max,
} from 'class-validator';

export class CreateChatRoomDto {
  @IsString()
  name: string;

  @IsString()
  @IsOptional()
  description?: string;

  @IsBoolean()
  @IsOptional()
  isPublic?: boolean;

  @IsBoolean()
  @IsOptional()
  isSearchable?: boolean;

  @IsString()
  @IsOptional()
  password?: string;

  @IsNumber()
  @Min(1)
  @Max(1000)
  @IsOptional()
  maxUsers?: number;
}
